package com.greedy.controller;

import com.greedy.bean.pojo.ShopType;
import com.greedy.service.ShopTypeService;
import com.greedy.utils.Result;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: Yanxy
 * @Date: Created in:2022-12-24
 * Description: 店铺类型
 */
@RestController
@RequestMapping("/shop-type")
public class ShopTypeController {

    @Resource
    private ShopTypeService shopTypeService;

    /**
     * 查询店铺类型信息
     *
     * @return 店铺信息
     */
    @GetMapping("/list")
    public Result queryTypeList() {
        List<ShopType> allShopType = shopTypeService.getAllShopType();
        return Result.ok(allShopType);
    }

}
